package org.haifi.webapp.action;

import org.apache.commons.lang.StringUtils;

/**
 * 使用反射类
 * 
 * @author joycube2
 * 
 */
public class GameReflectAction extends BasicAction {
	private Class clazz;
	private static final String CLASS_KEY = "CLASS_KEY";

	public void prepare() {
		clazz = (Class) getSession().getAttribute(CLASS_KEY);
		String className = getRequest().getParameter("className");
		if (!StringUtils.isEmpty(className)) {
			try {
				clazz = Class.forName("org.haifi.game.model." + className);
				getSession().setAttribute(CLASS_KEY, clazz);
			} catch (Exception e) {
				log.error("ERROR", e);
			}
		}
	}
	
	public String list(){
		return null;
	}
	
	
}
